#!/bin/bash

echo $PWD

echo ${PWD#*/}
echo ${PWD##*/}

FILE=T.myfile.c

echo ${FILE%.*}
echo ${FILE%%.*}

echo ${#@}  # return the count of arguments

echo ${#*}  # return the count of arguments

array=(there is an array)

array[9]=tail

echo ${#array[0]} # return the length of array[0]

echo ${#array[*]} # return the actual length of array
echo ${#array[@]} # return the actual length of array

for i in ./*.sh ; do
    if [ -r "$i" ]; then
        if [ "${-#*B}" != "$-" ]; then
        	echo $-
            # . "$i" 
        else
            . "$i" >/dev/null 2>&1
        fi
    fi
done